This invention relates to an image processing apparatus and an image processing method and can be applied to an image processing apparatus such as, for example, a television receiver, a video tape recorder, a television camera and a printer.
Conventionally, an image processing apparatus such as a television camera corrects the gradation of image data obtained from an image inputting apparatus such as an image pickup apparatus and outputs the image data of the corrected gradation.
FIG. 30 is a characteristic diagram showing an input/output characteristic of a signal processing circuit adapted to such gradation correction processing. A signal processing circuit of the type described decreases the gain when the input level L increases higher than a predetermined reference level Lk. Consequently, a signal processing circuit of the type described suppresses the signal level and outputs the signal of the suppressed signal level when the input level is higher than the reference level Lk. In this instance, the gradation is corrected sacrificing the contract at a portion of an image having a comparatively high signal level.
In the characteristic diagram of FIG. 30, the axis of abscissa represents the pixel value L which is the input level of image data while the axis of ordinate represents the pixel value T(L) which is the output level of the image data, and Lmax represents the maximum level which can be taken by any pixel of the input/output images. In the following description, a function indicative of an input/output function as represented by the characteristic curve of FIG. 30 is referred to as level conversion function.
FIG. 31 is a characteristic diagram showing an input/output characteristic of another signal processing circuit of a similar type. The signal processing circuit which uses the level conversion function illustrated in FIG. 31 decreases the gain when the input level L is lower than a first reference level Ls and when the input level L is higher than a second reference level Lb. Consequently, the signal processing circuit corrects the gradation sacrificing the contrast where the signal level is comparatively low and where the signal level is comparatively high with respect to an intermediate range of the input signal level.
On the other hand, in image processing and so forth wherein a computer is used, the gradation is corrected, for example, by histogram equalization.
The histogram equalization is a method of adaptively varying the level conversion function in response to the frequency distribution of a pixel value of an input image, and corrects the gradation by reducing the gradation at a portion where the frequency distribution of the pixel value is low.
Referring to FIG. 32, in processing of the histogram equalization, a cumulative frequency distribution C(L) by arithmetic processing of the following expression (1) is detected based on a frequency distribution H(L) which is an aggregate of the pixel number with reference to the pixel value L of the input image:
                              C          ⁡                      (            L            )                          =                              ∑                          k              =              0                        L                    ⁢                      H            ⁡                          (              k              )                                                          (        1        )            
In the processing of the histogram equalization, the cumulative frequency distribution C(L) detected in this manner is normalized in accordance with the following expression (2) to define a level conversion function T(L), and the signal level of the input image is corrected in accordance with the level conversion function T(L).T(L)=C(L)/Fmax×Lmax  (2)where Fmax is the final value of the cumulative frequency distribution C(L), and Lmax is the maximum value of the input/output levels
Such processing of correcting the gradation as described above is executed suitably in accordance with the necessity in order to suppress the dynamic range or for some otherobject when image data are transmitted over a transmission line, when image data are displayed on a display unit, when image data are stored into a storage device or in a like case.
In the correction processes of the gradation according to the conventional techniques described above, the entire gradation is corrected sacrificing the contrast at some portion of the input image. This is because, with any of the techniques, the level is converted with an input/output function having a monotone increasing property in order to prevent production of an unnatural image.
Accordingly, the conventional techniques have a problem in that an image obtained by processing finally has a partially reduced contrast.